#include "BST.h"
#include <stdlib.h>
#include <stdio.h>

int main(void) {
	//BST* tree = bst_create();
	//if (!tree) {
	//	printf("Error: bst_create failed.\n");
	//	exit(1);
	//}

	//bst_insert(tree, 9);
	//bst_insert(tree, 42);
	//bst_insert(tree, 5);
	//bst_insert(tree, 13);
	//bst_insert(tree, 3);
	//bst_insert(tree, 57);
	//bst_insert(tree, 57);
	//bst_insert(tree, 57);

	// TreeNode* node1 = bst_search(tree, 5);
	// TreeNode* node2 = bst_search(tree, 9527);

	// bst_delete(tree, 3);
	// bst_delete(tree, 5);
	// bst_delete(tree, 9);
	// bst_delete(tree, 42);

	// bst_inorder(tree);
	// bst_levelorder(tree);

	int inOrder[] = { 3, 5, 9, 13, 42, 57 };
	int postOrder[] = { 3, 5, 13, 57, 42, 9 };
	BST* tree = build_tree(inOrder, postOrder, 6);

	return 0;
}